* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    margin: 0;
    background-color: #fff;
    padding: 30px;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    flex: 1 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.text-input-area {
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-size: 16px;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

input, select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

input[type="range"] {
    width: 100%;
}

input[type="color"] {
    height: 40px;
    width: 100%;
}

input[type="number"] {
    width: 100%;
}

input[type="checkbox"] {
    margin-right: 5px;
}

#widthAutoCheckbox, #heightAutoCheckbox {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

#widthAutoCheckbox label, #heightAutoCheckbox label {
    margin-bottom: 0;
    font-weight: normal;
    margin-left: 5px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#generateBtn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background-color: #2ecc71;
}

#generateBtn:hover {
    background-color: #27ae60;
}

.preview-area {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.canvas-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

canvas {
    max-width: 100%;
    display: block;
}

.download-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.filename-input {
    position: relative;
    display: flex;
    align-items: center;
}

#filenameInput {
    padding-right: 40px;
    width: 200px;
}

.file-extension {
    position: absolute;
    right: 10px;
    color: #666;
    pointer-events: none;
}

.footer {
    position: relative;
    width: 100%;
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 18px 0;
    font-size: 16px;
    margin-top: auto;
    left: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
    
    .download-controls {
        flex-direction: column;
    }
    
    #filenameInput {
        width: 100%;
    }
} 